import Vue from 'vue'
import App from './App.vue'
import router from './router'
import 'element-ui/lib/theme-chalk/index.css'
import './styles/common.scss'

/* 全局组件 */
import * as Components from './components';//全局组件
Object.keys(Components).forEach((componentName) => {
  Vue.use(Components[componentName])
});
//特殊处理
import Loading from 'element-ui/lib/loading'
import MessageBox from 'element-ui/lib/message-box'
import Message from 'element-ui/lib/message'
import contextMenu from './components/contextMenu/contextMenu'
Vue.use(Loading)
Vue.prototype.$contextMenu = contextMenu
Vue.prototype.$confirm = MessageBox.confirm
Vue.prototype.$message = Message

/* 引入axios */
import * as Axios from './utils/axios';
Object.keys(Axios).forEach((axiosName) => {
  Vue.use(Axios[axiosName])
});


Vue.config.productionTip = false
new Vue({
  router,
  render: h => h(App)
}).$mount('#app')
